import service from '@/utils/http-util';

export const useMenuApi = () => {
  return {
    save(data) {
      return service.post('menu', data);
    },
    getList() {
      return service.get('menu');
    },
    /** 查询菜单带权限 */
    getMenuWithPerms() {
      return service.get('menu/findAllWithPermissions');
    },
    delete(menuId) {
      return service.delete('menu/' + menuId);
    },
  };
};
